package com.qf.service.impl;

import com.qf.mapper.BookMapper;
import com.qf.pojo.Books;
import com.qf.pojo.req.BookType;
import com.qf.service.BookService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class BookServiceImpl implements BookService {
    @Resource
    BookMapper bookMapper;
    @Override
    public List<BookType> findBookByBcid(int bcid) {
        return bookMapper.findBookByBcid(bcid);
    }

    @Override
    public BookType findBookByBid(int bid) {
        return bookMapper.findBookByBid(bid);
    }

    @Override
    public int add(Books books) {
        return bookMapper.add(books);
    }

    @Override
    public int update(Books books) {
        return bookMapper.update(books);
    }

    @Override
    public int delete(int bid) {
        return bookMapper.delete(bid);
    }

    @Override
    public List<Books> findAll() {
        return bookMapper.findAll();
    }

    @Override
    public Books findByBid(int bid) {
        return bookMapper.findByBid(bid);
    }
}
